package com.slicktechnologies.client.userconfigurations;

import com.slicktechnologies.shared.common.helperlayer.User;

public class UserConfiguration 
{
	private  long companyId;
	private  User user;
	
	private static UserConfiguration userconfig;
	
	
	
	
	private UserConfiguration() {
		super();
		user=new User();
		
	}
	public void setCompanyId(long companyId) {
		this.companyId = companyId;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	public static void initUserConfiguration(User user,Long company)
	{
		System.out.println("Kom"+userconfig);
		
		if(userconfig==null)
		{
			userconfig=new UserConfiguration();
			userconfig.setCompanyId(company);
			System.out.println("Ajay ");
			userconfig.setUser(user);
			
		}
		
	}
	public static UserConfiguration getUserconfig() {
		return userconfig;
	}
	public static void setUserconfig(UserConfiguration userconfig) {
		UserConfiguration.userconfig = userconfig;
	}
	
	public static Long getCompanyId()
	{
		if(userconfig!=null)
		    return userconfig.companyId;
		return null;
	}

	
	
	
	
		
		
	}
	
	

